package fun.chutianshu;

//实物类
public class Food {
    private int addHpNum;
    private String name;
    private int cost;

    public Food() {
    }

    public Food(int addHpNum, String name) {
        this.addHpNum = addHpNum;
        this.name = name;
    }

    public Food(int addHpNum, String name, int cost) {
        this.addHpNum = addHpNum;
        this.name = name;
        this.cost = cost;
    }

    public int getAddHpNum() {
        return addHpNum;
    }

    public void setAddHpNum(int addHpNum) {
        this.addHpNum = addHpNum;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getCost() {
        return cost;
    }

    public void setCost(int cost) {
        this.cost = cost;
    }

    @Override
    public String toString() {
        return "Food{" +
                "addHpNum=" + addHpNum +
                ", name='" + name + '\'' +
                ", cost=" + cost +
                '}';
    }

    public void print(){
        System.out.println(this.toString());
    }

}
